#!/bin/bash
# PATCHIT SCRIPT
# PATCH SCRIPT FOR NETWORK BLOCK DEVICE DRIVER
# VERSION 2.9.6
# ---------------------------------------------

VERSION="2.9.6"
FILES="configure nbd-client.c nbd-server.c"
PTCH=`which patch`

echo "PREPARING TO PATCH NBD VERSION $VERSION"

for a in $FILES; do
    if [ -s $a ];then 
	echo "...PATCHING $a"
	$PTCH $a $a.patch 
	echo "...DONE"
    else
	echo "ERROR :: COULD NOT FIND FILE : $a"
	exit 1;
    fi
done;

echo "DONE PATCHING... CONFIGURE AND INSTALL NBD"
exit 0;

#--EOF

